public class Test1 {
    public static void main(String[] args) {
        A a=new C();
    }
}
 class A{}
class B extends A{}
class C extends B{}